package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Objects;

import lombok.Data;

/**
 * @desc RoleCodeVirtualOrgMemberDto
 * @使用场景
 */
@Data
public class RoleCodeVirtualOrgMemberDto
  extends BaseDto
  implements Serializable {

  /**
   * 身份人员ID
   */
  @ApiModelProperty("身份人员ID")
  private String originalRoleMemberId;

  /**
   * 个人账号
   */
  @ApiModelProperty("个人账号")
  private String userId;

  /**
   * 角色标识
   */
  @ApiModelProperty("角色标识")
  private String roleCode;

  /**
   * 虚拟组织成员ID
   */
  @ApiModelProperty("虚拟组织成员ID")
  private String virtualOrgMemberId;

  /**
   * 虚拟组织成员就职记录ID
   */
  @ApiModelProperty("虚拟组织成员就职记录ID")
  private String virtualOrgInductionRecordId;

  /**
   * 虚拟组织ID
   */
  @ApiModelProperty("虚拟组织ID")
  private String virtualOrgId;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    RoleCodeVirtualOrgMemberDto that = (RoleCodeVirtualOrgMemberDto) o;
    return (
      originalRoleMemberId == that.originalRoleMemberId &&
      userId == that.userId &&
      roleCode == that.roleCode &&
      virtualOrgMemberId == that.virtualOrgMemberId &&
      virtualOrgInductionRecordId == that.virtualOrgInductionRecordId &&
      virtualOrgId == that.virtualOrgId
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      originalRoleMemberId,
      userId,
      roleCode,
      virtualOrgMemberId,
      virtualOrgInductionRecordId,
      virtualOrgId
    );
  }

}
